﻿package mortal.game.view.levelReward.cellrender
{
    import com.mui.controls.*;
    import com.mui.utils.*;
    import mortal.game.cache.*;
    import mortal.game.view.levelReward.other.*;
    import mortal.game.view.levelReward.panel.*;

    public class LevelRewardVipUpBtnCellRenderer extends GCellRenderer
    {
        public var btn:LevelRewardVipUpBtn;

        public function LevelRewardVipUpBtnCellRenderer()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.btn = UICompomentPool.getUICompoment(LevelRewardVipUpBtn) as LevelRewardVipUpBtn;
            addChild(this.btn);
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            super.data = param1;
            var _loc_2:* = param1 as LevelRewardVIPUpClickData;
            this.btn.frameIndex = _loc_2.index;
            this.btn.btnMouseDown = _loc_2.func;
            if (_loc_2.pannel == LevelRewardVipUpGiftPanel && Cache.instance.levelReward.canReceiveGiftsNum > 0)
            {
                this.btn.playEffect();
            }
            else
            {
                this.btn.stopEffect();
            }
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this.btn.dispose(param1);
            this.btn = null;
            super.disposeImpl(param1);
            return;
        }// end function

    }
}
